home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Stuff / 3D_Reality / 3D_Reality_API / Examples / Patch.bproj / Patch.h < prev    next >
Encoding:
Text File  |  1992-10-09  |  1.4 KB  |  47 lines

  1.  
  2.  
  3. @class List;
  4.  
  5. // Patch.h    Peter Wickersham
  6. //
  7. // Patch : Shape : N3DShape : Object
  8. // 
  9. // Patch is a Geometry object for drawing Bicubic Patchs within 
  10. // 3DReailty using RenderMan function calls.  A Patch is defined by it's
  11. // 16 control points which form a simple tensor product surface.  Therefore,
  12. // within 3DReality a Patch consists of a List of 16 control point shapes
  13. // which appear as descendents of a Patch in the hierarchy.  They present
  14. // themselves to the user as normal 3DReality spheres which may be manipulated
  15. // as any other object in the window may, but have the added effect of 
  16. // changing the Patch which depends on them.
  17.  
  18. @interface Patch : Shape 
  19. {
  20.     id         controlPts;    // List of control point objects
  21.     int      uBasis;        // The basis matrix in u parameter space
  22.     RtBasis    theUBasis;    // The actual basis matrix
  23.     int      vBasis;        // The basis matrix in v parameter space
  24.     RtBasis    theVBasis;    // The actual basis matrix
  25.     BOOL     showCtlPoints;    // Show control points?
  26.     BOOL    showHull;    // Show control hull?
  27.     int     uStep;         // Step values for evaluation window
  28.     int      vStep;         // Step values for evaluation window
  29. }
  30.  
  31. // Initialization of the Patch object
  32. - init;
  33.  
  34. // Methods for getting/setting values of instance variables
  35. - (BOOL) hullVisible;
  36. - setHullVisible:(BOOL) flag;
  37.  
  38. - (BOOL)controlVisible;
  39. - setControlVisible:(BOOL)flag;
  40.  
  41. - (int)uBasis;
  42. - setUBasis:(int)theU;
  43.  
  44. - (int)vBasis;
  45. - setVBasis:(int)theV;
  46.  
  47. @end